To struggle to think of or remember something.
I have been racking my brain all day trying to think of a birthday present for her.